﻿/// <reference path="jquery-1.5.1.js" />

$(document).ready(function () {
    interval = setInterval(function () {
        var ctrl = $('#timeleft');
        var timeleft = parseInt(ctrl.html());
        if (timeleft == 0)
            clearInterval(interval);
        else
            ctrl.html(--timeleft);
    }, 1000);

});